
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>9.4、集成 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="chapter10.html" />
    
    
    <link rel="prev" href="chapter9.3.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"xiaolanyun","repo":"DevOps_wiki","type":"star","size":"30px"}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="chapter1.html">
            
                <a href="chapter1.html">
            
                    
                    1、设计思路
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="chapter1.1.html">
            
                <a href="chapter1.1.html">
            
                    
                    1.1、参考文献
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="chapter2.html">
            
                <a href="chapter2.html">
            
                    
                    2、服务器
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="chapter2.1.html">
            
                <a href="chapter2.1.html">
            
                    
                    2.1、配置静态ip
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="chapter2.2.html">
            
                <a href="chapter2.2.html">
            
                    
                    2.2、Centos7扩容
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="chapter3.html">
            
                <a href="chapter3.html">
            
                    
                    3、mysql
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="chapter3.1.html">
            
                <a href="chapter3.1.html">
            
                    
                    3.1、初始化登录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="chapter3.2.html">
            
                <a href="chapter3.2.html">
            
                    
                    3.2、mysql5.7&8.0设置用户密码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="chapter3.3.html">
            
                <a href="chapter3.3.html">
            
                    
                    3.3、mysql5.7&8.0开启远程登录权限
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="chapter3.4.html">
            
                <a href="chapter3.4.html">
            
                    
                    3.4、mysql8.0驱动
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="chapter3.5.html">
            
                <a href="chapter3.5.html">
            
                    
                    3.5、mysql更改端口号
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="chapter4.html">
            
                <a href="chapter4.html">
            
                    
                    4、mongodb
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="chapter4.1.html">
            
                <a href="chapter4.1.html">
            
                    
                    4.1、安装部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="chapter4.2.html">
            
                <a href="chapter4.2.html">
            
                    
                    4.2、集群测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="chapter5.html">
            
                <a href="chapter5.html">
            
                    
                    5、redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="chapter5.1.html">
            
                <a href="chapter5.1.html">
            
                    
                    5.1、安装部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="chapter5.2.html">
            
                <a href="chapter5.2.html">
            
                    
                    5.2、集群测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="chapter5.3.html">
            
                <a href="chapter5.3.html">
            
                    
                    5.3、配置服务
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="chapter6.html">
            
                <a href="chapter6.html">
            
                    
                    6、Nexus
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="chapter6.1.html">
            
                <a href="chapter6.1.html">
            
                    
                    6.1、windows&linux_maven
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="chapter6.2.html">
            
                <a href="chapter6.2.html">
            
                    
                    6.2、Nexus
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="chapter7.html">
            
                <a href="chapter7.html">
            
                    
                    7、ZenTao
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="chapter7.1.html">
            
                <a href="chapter7.1.html">
            
                    
                    7.1、安装部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="chapter7.2.html">
            
                <a href="chapter7.2.html">
            
                    
                    7.2、禅道部分概念释义
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="chapter8.html">
            
                <a href="chapter8.html">
            
                    
                    8、jenkins
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="chapter8.1.html">
            
                <a href="chapter8.1.html">
            
                    
                    8.1、git
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="chapter8.2.html">
            
                <a href="chapter8.2.html">
            
                    
                    8.2、gradle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="chapter8.3.html">
            
                <a href="chapter8.3.html">
            
                    
                    8.3、sdk
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="chapter8.4.html">
            
                <a href="chapter8.4.html">
            
                    
                    8.4、jenkins安装部署
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="chapter9.html">
            
                <a href="chapter9.html">
            
                    
                    9、Sonar
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="chapter9.1.html">
            
                <a href="chapter9.1.html">
            
                    
                    9.1、SonarQube
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="chapter9.2.html">
            
                <a href="chapter9.2.html">
            
                    
                    9.2、配置服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="chapter9.3.html">
            
                <a href="chapter9.3.html">
            
                    
                    9.3、SonarQubeScanner
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.10.4" data-path="chapter9.4.html">
            
                <a href="chapter9.4.html">
            
                    
                    9.4、集成
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="chapter10.html">
            
                <a href="chapter10.html">
            
                    
                    10、Android本地商城被测件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="chapter10.1.html">
            
                <a href="chapter10.1.html">
            
                    
                    10.1、Android本地商城需求
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="chapter10.2.html">
            
                <a href="chapter10.2.html">
            
                    
                    10.2、Android本地商城功能设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="chapter10.3.html">
            
                <a href="chapter10.3.html">
            
                    
                    10.3、Android本地商城业务及数据库设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.4" data-path="chapter10.4.html">
            
                <a href="chapter10.4.html">
            
                    
                    10.4、Android本地商城UI设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.5" data-path="chapter10.5.html">
            
                <a href="chapter10.5.html">
            
                    
                    10.5、Android本地商城托管地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.6" data-path="chapter10.6.html">
            
                <a href="chapter10.6.html">
            
                    
                    10.6、Android自动化构建
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="chapter11.html">
            
                <a href="chapter11.html">
            
                    
                    11、Appium_自动化测试框架
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="chapter11.1.html">
            
                <a href="chapter11.1.html">
            
                    
                    11.1、总体设计思路
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="chapter11.2.html">
            
                <a href="chapter11.2.html">
            
                    
                    11.2、环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="chapter11.3.html">
            
                <a href="chapter11.3.html">
            
                    
                    11.3、自动化测试框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="chapter11.4.html">
            
                <a href="chapter11.4.html">
            
                    
                    11.4、自动化测试框架托管地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.5" data-path="chapter11.5.html">
            
                <a href="chapter11.5.html">
            
                    
                    11.5、并行测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.6" data-path="chapter11.6.html">
            
                <a href="chapter11.6.html">
            
                    
                    11.6、并行测试框架托管地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.7" data-path="chapter11.7.html">
            
                <a href="chapter11.7.html">
            
                    
                    11.7、持续集成
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="chapter12.html">
            
                <a href="chapter12.html">
            
                    
                    12、Maxim_Monkey
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="chapter12.1.html">
            
                <a href="chapter12.1.html">
            
                    
                    12.1、Maxim_Monkey使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="chapter12.2.html">
            
                <a href="chapter12.2.html">
            
                    
                    12.2、Maxim_Monkey托管地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.3" data-path="chapter12.3.html">
            
                <a href="chapter12.3.html">
            
                    
                    12.3、持续集成
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="chapter13.html">
            
                <a href="chapter13.html">
            
                    
                    13、postman&newman
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="chapter13.1.html">
            
                <a href="chapter13.1.html">
            
                    
                    13.1、postman接口测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="chapter13.2.html">
            
                <a href="chapter13.2.html">
            
                    
                    13.2、newman
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.3" data-path="chapter13.3.html">
            
                <a href="chapter13.3.html">
            
                    
                    13.3、接口自动化示例托管地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.4" data-path="chapter13.4.html">
            
                <a href="chapter13.4.html">
            
                    
                    13.4、持续集成
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="chapter14.html">
            
                <a href="chapter14.html">
            
                    
                    14、open-falcon
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="chapter14.1.html">
            
                <a href="chapter14.1.html">
            
                    
                    14.1、环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.2" data-path="chapter14.2.html">
            
                <a href="chapter14.2.html">
            
                    
                    14.2、单机&分布式安装说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.3" data-path="chapter14.3.html">
            
                <a href="chapter14.3.html">
            
                    
                    14.3、dashboard
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.4" data-path="chapter14.4.html">
            
                <a href="chapter14.4.html">
            
                    
                    14.4、Agent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.5" data-path="chapter14.5.html">
            
                <a href="chapter14.5.html">
            
                    
                    14.5、Transfer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.6" data-path="chapter14.6.html">
            
                <a href="chapter14.6.html">
            
                    
                    14.6、Graph
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.7" data-path="chapter14.7.html">
            
                <a href="chapter14.7.html">
            
                    
                    14.7、API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.8" data-path="chapter14.8.html">
            
                <a href="chapter14.8.html">
            
                    
                    14.8、HBS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.9" data-path="chapter14.9.html">
            
                <a href="chapter14.9.html">
            
                    
                    14.9、Judge
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.10" data-path="chapter14.10.html">
            
                <a href="chapter14.10.html">
            
                    
                    14.10、Alarm
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.11" data-path="chapter14.11.html">
            
                <a href="chapter14.11.html">
            
                    
                    14.11、Nodata
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.12" data-path="chapter14.12.html">
            
                <a href="chapter14.12.html">
            
                    
                    14.12、Aggregator
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="chapter15.html">
            
                <a href="chapter15.html">
            
                    
                    15、gitbook_wiki
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.16.1" data-path="chapter15.1.html">
            
                <a href="chapter15.1.html">
            
                    
                    15.1、wiki搭建使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="chapter16.html">
            
                <a href="chapter16.html">
            
                    
                    16、前端
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" data-path="chapter16.1.html">
            
                <a href="chapter16.1.html">
            
                    
                    16.1、UI设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="chapter16.2.html">
            
                <a href="chapter16.2.html">
            
                    
                    16.2、前端托管地址
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="chapter17.html">
            
                <a href="chapter17.html">
            
                    
                    17、附加说明
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.18.1" data-path="chapter17.1.html">
            
                <a href="chapter17.1.html">
            
                    
                    17.1、服务器配置一览
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >9.4、集成</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="94&#x3001;&#x96C6;&#x6210;">9.4&#x3001;&#x96C6;&#x6210;</h3>
<p>1&#x3001;jenkins&#x63D2;&#x4EF6;&#x7BA1;&#x7406;&#x641C;&#x7D22;sonarqube&#x5B89;&#x88C5;</p>
<p><img src="image/9.4.0.png" alt=""></p>
<p>&#x7CFB;&#x7EDF;&#x7BA1;-&#x300B;&#x7CFB;&#x7EDF;&#x8BBE;&#x7F6E;</p>
<p><img src="image/9.4.1.png" alt=""></p>
<p>&#x7CFB;&#x7EDF;&#x7BA1;&#x7406;-&#x300B;&#x5168;&#x5C40;&#x5DE5;&#x5177;&#x8BBE;&#x7F6E;</p>
<p><img src="image/9.4.2.png" alt=""></p>
<p>&#x6211;&#x7684;&#x89C6;&#x56FE;-&#x300B;job&#x914D;&#x7F6E;</p>
<p><img src="image/9.4.3.png" alt=""></p>
<hr>
<pre><code>&#x5728;&#x6784;&#x5EFA;BUILD&#x4E2D;&#x914D;&#x7F6E; SonarQube Scanner &#x6784;&#x5EFA;&#x6B65;&#x9AA4;&#xFF0C;&#x5728; 
Task to run &#x8F93;&#x5165;&#x6846;&#x4E2D;&#x8F93;&#x5165; scan&#xFF0C;&#x5373;&#x5206;&#x6790;&#x4EE3;&#x7801;&#xFF1B;

JDK &#x9009;&#x62E9;&#x6846;&#x4E2D;&#x9009;&#x62E9; SonarQube Scanner &#x4F7F;&#x7528;&#x7684; JDK&#xFF08;&#x6CE8;&#x610F;&#x8FD9;&#x91CC;&#x5FC5;&#x987B;&#x662F; JDK &#x4E0D;&#x80FD;&#x662F; JRE&#xFF09;&#xFF1B;

Path to project properties &#x662F;&#x53EF;&#x9009;&#x62E9;&#x7684;&#x8F93;&#x5165;&#x6846;&#xFF0C;&#x8FD9;&#x91CC;&#x53EF;&#x4EE5;&#x6307;&#x5B9A;&#x4E00;&#x4E2A; sonar-project.properties &#x6587;&#x4EF6;&#xFF0C;&#x5982;&#x679C;&#x4E0D;&#x6307;&#x5B9A;&#x7684;&#x8BDD;&#x4F1A;&#x4F7F;&#x7528;&#x9879;&#x76EE;&#x9ED8;&#x8BA4;&#x7684; properties &#x6587;&#x4EF6;&#xFF1B;

Analysis properties &#x8F93;&#x5165;&#x6846;&#xFF0C;&#x8FD9;&#x91CC;&#x9700;&#x8981;&#x8F93;&#x5165;&#x4E00;&#x4E9B;&#x914D;&#x7F6E;&#x53C2;&#x6570;&#x7528;&#x6765;&#x4F20;&#x9012;&#x7ED9; SonarQube&#xFF0C;&#x8FD9;&#x91CC;&#x7684;&#x53C2;&#x6570;&#x4F18;&#x5148;&#x7EA7;&#x9AD8;&#x4E8E; sonar-project.properties &#x6587;&#x4EF6;&#x91CC;&#x9762;&#x7684;&#x53C2;&#x6570;&#xFF0C;&#x6240;&#x4EE5;&#x53EF;&#x4EE5;&#x5728;&#x8FD9;&#x91CC;&#x6765;&#x914D;&#x7F6E;&#x6240;&#x6709;&#x7684;&#x53C2;&#x6570;&#x4EE5;&#x66FF;&#x4EE3; sonar-project.properties &#x6587;&#x4EF6;&#xFF0C;&#x4E0B;&#x9762;&#x5217;&#x51FA;&#x4E86;&#x4E00;&#x4E9B;&#x53C2;&#x6570;&#xFF1A;

sonar.language &#x6307;&#x5B9A;&#x4E86;&#x8981;&#x5206;&#x6790;&#x7684;&#x5F00;&#x53D1;&#x8BED;&#x8A00;&#xFF08;&#x7279;&#x5B9A;&#x7684;&#x5F00;&#x53D1;&#x8BED;&#x8A00;&#x5BF9;&#x5E94;&#x4E86;&#x7279;&#x5B9A;&#x7684;&#x89C4;&#x5219;&#xFF09;&#xFF0C;

sonar.sources &#x5B9A;&#x4E49;&#x4E86;&#x9700;&#x8981;&#x5206;&#x6790;&#x7684;&#x6E90;&#x4EE3;&#x7801;&#x4F4D;&#x7F6E;&#xFF08;&#x793A;&#x4F8B;&#x4E2D;&#x7684;$WORKSPACE &#x6240;&#x6307;&#x793A;&#x7684;&#x662F;&#x5F53;&#x524D; Jenkins &#x9879;&#x76EE;&#x7684;&#x76EE;&#x5F55;&#xFF09;&#xFF0C;

sonar.java.binaries &#x5B9A;&#x4E49;&#x4E86;&#x9700;&#x8981;&#x5206;&#x6790;&#x4EE3;&#x7801;&#x7684;&#x7F16;&#x8BD1;&#x540E; class &#x6587;&#x4EF6;&#x4F4D;&#x7F6E;&#xFF1B;

sonar.projectKey&#x548C;sonar.projectName&#x4E00;&#x822C;&#x662F;&#x9879;&#x76EE;&#x540D;

------

[
&#x8BE5;&#x5B57;&#x6BB5;&#x5141;&#x8BB8;&#x5C06;&#x4E00;&#x4E9B;&#x914D;&#x7F6E;&#x53C2;&#x6570;&#x4F20;&#x9012;&#x7ED9;SonarQube&#x3002;&#x8FD9;&#x91CC;&#x5B9A;&#x4E49;&#x7684;&#x53C2;&#x6570;&#x4F18;&#x5148;&#x4E8E;&#x6307;&#x5B9A;&#x7684;&#x58F0;&#x5450;-Project.properties&#x6587;&#x4EF6;&#x4E2D;&#x53EF;&#x80FD;&#x5B9A;&#x4E49;&#x7684;&#x53C2;&#x6570;&#x3002;&#x751A;&#x81F3;&#x53EF;&#x4EE5;&#x5728;&#x8FD9;&#x91CC;&#x6307;&#x5B9A;&#x6240;&#x6709;SonarQube&#x53C2;&#x6570;&#xFF0C;&#x5E76;&#x5C06;&#x201C;&#x5230;&#x9879;&#x76EE;&#x5C5E;&#x6027;&#x7684;&#x8DEF;&#x5F84;&#x201D;&#x8F93;&#x5165;&#x5B57;&#x6BB5;&#x4FDD;&#x6301;&#x4E3A;&#x7A7A;&#x3002;

#unique project identifier (required)

&#x552F;&#x4E00;&#x9879;&#x76EE;&#x6807;&#x8BC6;(Required)
sonar.projectKey=my:project

#project metadata (used to be required, optional since SonarQube 6.1)

&#x9879;&#x76EE;&#x5143;&#x6570;&#x636E;&#xFF08;&#x7528;&#x4E8E;&#x8981;&#x6C42;&#xFF0C;&#x53EF;&#x9009;&#x81EA;sonarquis6.1&#xFF09;
sonar.projectName=My project
sonar.projectVersion=1.0

#path to source directories (required)

&#x6E90;&#x76EE;&#x5F55;&#x7684;&#x8DEF;&#x5F84;(&#x5FC5;&#x9700;)
sonar.sources=srcDir1,srcDir2

#path to test source directories (optional)

sonar.tests=testDir1,testDir2
&#x6D4B;&#x8BD5;&#x6E90;&#x76EE;&#x5F55;&#x7684;&#x8DEF;&#x5F84;&#xFF08;&#x53EF;&#x9009;&#xFF09;

#path to Java project compiled classes (optional)

Java&#x9879;&#x76EE;&#x7F16;&#x8BD1;&#x7C7B;&#x7684;&#x8DEF;&#x5F84;(&#x53EF;&#x9009;)
sonar.java.binaries=bin

#comma-separated list of paths to libraries (optional)

&#x9017;&#x53F7;&#x5206;&#x9694;&#x7684;&#x5E93;&#x8DEF;&#x5F84;&#x5217;&#x8868;(&#x53EF;&#x9009;)
sonar.java.libraries=path/to/library.jar,path/to/classes/dir

#Additional parameters

&#x9644;&#x52A0;&#x53C2;&#x6570;
sonar.my.property=value

]

------

&#x5728;Analysis properties&#x4E2D;&#x8F93;&#x5165;&#x68C0;&#x67E5;&#x89C4;&#x5219;&#xFF0C;&#x4EE5;&#x4E0B;&#x662F;&#x8FD0;&#x7528;&#x591A;&#x4E2A;&#x68C0;&#x67E5;&#x9879;&#x7684;&#x89C4;&#x5219;
sonar.projectKey=XiaoLanYunMart_sonar1
sonar.projectName=XiaoLanYunMart
sonar.projectVersion=1.1.0
sonar.sources=app/src/main/java
sonar.java.binaries=app/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes
sonar.language=java
sonar.sourceEncoding=UTF-8
sonar.profile=Android Lint
sonar.login=admin
sonar.password=admin

------

Additional arguments &#x8F93;&#x5165;&#x6846;&#x4E2D;&#x53EF;&#x4EE5;&#x8F93;&#x5165;&#x4E00;&#x4E9B;&#x9644;&#x52A0;&#x7684;&#x53C2;&#x6570;&#xFF0C;
&#x793A;&#x4F8B;&#x4E2D;&#x7684;-X &#x610F;&#x601D;&#x662F;&#x8FDB;&#x5165; SonarQube Scanner &#x7684; Debug &#x6A21;&#x5F0F;&#xFF0C;&#x8FD9;&#x6837;&#x4F1A;&#x8F93;&#x51FA;&#x66F4;&#x591A;&#x7684;&#x65E5;&#x5FD7;&#x4FE1;&#x606F;&#xFF1B;

JVM Options &#x53EF;&#x4EE5;&#x8F93;&#x5165;&#x5728;&#x6267;&#x884C; SonarQube Scanner &#x662F;&#x9700;&#x8981;&#x7684; JVM &#x53C2;&#x6570;
</code></pre><p><img src="image/9.4.11.PNG" alt=""></p>
<hr>
<p>2&#x3001;androidstudio&#x5B89;&#x88C5;sonar lint&#x63D2;&#x4EF6;</p>
<p>file-&gt;setting-&gt;plugins-&gt;browse repositories,&#x641C;&#x7D22;sonar&#xFF0C;&#x5B89;&#x88C5;&#xFF0C;&#x91CD;&#x542F;</p>
<p>&#x7EE7;&#x7EED;&#x914D;&#x7F6E;</p>
<p><img src="image/9.4.4.png" alt=""></p>
<pre><code>sonarqube&#x914D;&#x7F6E;&#x5B8C;&#x6210;&#x540E;&#x70B9;&#x51FB;update binding
&#x56E0;&#x4E3A;sonarqube&#x5B89;&#x88C5;&#x5728;bigdata3&#x4E2D;&#xFF0C;&#x6240;&#x4EE5;&#x9700;&#x8981;&#x5728;bigdata3&#x4E2D;&#x6267;&#x884C;sonar-scanner&#x547D;&#x4EE4;&#x626B;&#x63CF;
&#x9996;&#x5148;&#x5728;androidstudio&#x914D;&#x7F6E;sonar-project.properties
sonar.projectKey=XiaoLanYunMart_sonar1
sonar.projectName=XiaoLanYunMart
sonar.projectVersion=1.1.0
sonar.sources=app/src/main/java
sonar.binaries=app/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes
&#x3010;&#x6216;&#x8005;app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes&#x3011;
sonar.language=java
sonar.sourceEncoding=UTF-8
sonar.profile=Android Lint
sonar.login=admin
sonar.password=admin

&#x6267;&#x884C;build-&gt;make project&#x751F;&#x6210;class&#x6587;&#x4EF6;app/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes/com/example/xiaolanyun/mart
</code></pre><p>/var/lib/jenkins/workspace/Mart/app/build/intermediates/javac/release/compileReleaseJavaWithJavac/classes/com/example/xiaolanyun/mart/adapters</p>
<p>androidstudio&#x8FDB;&#x884C;git&#x63D0;&#x4EA4;&#xFF0C;jenkins&#x8FDB;&#x884C;&#x6784;&#x5EFA;&#x66F4;&#x65B0;&#x9879;&#x76EE;&#x6587;&#x4EF6;
&#x9879;&#x76EE;&#x5728;bigdata3&#x4E2D;&#x5B58;&#x5728;&#x5730;&#x5740;/var/lib/jenkins/workspace
&#x53EF;&#x4EE5;&#x8FDB;&#x5165;&#x5176;&#x4E2D;&#x4E00;&#x4E2A;&#x9879;&#x76EE;&#x6839;&#x76EE;&#x5F55;</p>
<p><img src="image/9.4.5.png" alt=""></p>
<p>&#x5C31;&#x53EF;&#x4EE5;&#x626B;&#x63CF;&#x4E86;</p>
<p><img src="image/9.4.6.png" alt=""></p>
<hr>
<p>3&#x3001;&#x5BF9;sonar-project.properties&#x4E2D;&#x5C5E;&#x6027;&#x8BBE;&#x7F6E;&#x66FF;&#x6362;&#x53D8;&#x91CF;&#xFF0C;&#x907F;&#x514D;&#x6BCF;&#x6B21;&#x6539;&#x52A8;&#x9020;&#x6210;&#x5931;&#x8D25;</p>
<p><img src="image/9.4.7.png" alt=""></p>
<p><img src="image/9.4.8.png" alt=""></p>
<p><img src="image/9.4.12.PNG" alt=""></p>
<p><img src="image/9.4.13.PNG" alt=""></p>
<p><img src="image/9.4.9.png" alt=""></p>
<p><img src="image/9.4.10.png" alt=""></p>
<p><img src="image/9.4.14.PNG" alt=""></p>
<hr>
<p>4&#x3001;sonarqube&#x63D2;&#x4EF6;&#x63A8;&#x8350;&#x4E0B;&#x8F7D;</p>
<p>Chinese Pack</p>
<p>Findbugs</p>
<p>Git</p>
<p>SonarC#</p>
<p>SonarFlex</p>
<p>SonarTS</p>
<p>Svn</p>
<p>Android</p>
<p>Apigee</p>
<p>Checkstyle</p>
<p>SonarCSS</p>
<p>SonarHTML</p>
<p>SonarJS</p>
<p>SonarJava</p>
<p>SonarPHP</p>
<p>SonarPython</p>
<p>SonarQube :: Plugins :: SCM :: Git</p>
<p>SonarQube :: Plugins :: SCM :: SVN</p>
<p>SonarTS</p>
<p>SonarXML</p>

<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chapter9.3.html" class="navigation navigation-prev " aria-label="Previous page: 9.3、SonarQubeScanner">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="chapter10.html" class="navigation navigation-next " aria-label="Next page: 10、Android本地商城被测件">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"9.4、集成","level":"1.10.4","depth":2,"next":{"title":"10、Android本地商城被测件","level":"1.11","depth":1,"path":"chapter10.md","ref":"chapter10.md","articles":[{"title":"10.1、Android本地商城需求","level":"1.11.1","depth":2,"path":"chapter10.1.md","ref":"chapter10.1.md","articles":[]},{"title":"10.2、Android本地商城功能设计","level":"1.11.2","depth":2,"path":"chapter10.2.md","ref":"chapter10.2.md","articles":[]},{"title":"10.3、Android本地商城业务及数据库设计","level":"1.11.3","depth":2,"path":"chapter10.3.md","ref":"chapter10.3.md","articles":[]},{"title":"10.4、Android本地商城UI设计","level":"1.11.4","depth":2,"path":"chapter10.4.md","ref":"chapter10.4.md","articles":[]},{"title":"10.5、Android本地商城托管地址","level":"1.11.5","depth":2,"path":"chapter10.5.md","ref":"chapter10.5.md","articles":[]},{"title":"10.6、Android自动化构建","level":"1.11.6","depth":2,"path":"chapter10.6.md","ref":"chapter10.6.md","articles":[]}]},"previous":{"title":"9.3、SonarQubeScanner","level":"1.10.3","depth":2,"path":"chapter9.3.md","ref":"chapter9.3.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["back-to-top-button","chapter-fold","expandable-chapters-small","insert-logo","splitter","popup","github","github-buttons","livereload"],"pluginsConfig":{"chapter-fold":{},"github":{"url":"https://github.com/xiaolanyun","size":"50px"},"livereload":{},"splitter":{},"search":{},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"back-to-top-button":{},"github-buttons":{"buttons":[{"user":"xiaolanyun","repo":"DevOps_wiki","type":"star","size":"30px"}]},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"insert-logo":{"style":"background: none; max-height: 60px; min-height: 30px","url":"http://server.zzidc.com/uploads/allimg/171120/1-1G120162T3202.png"}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"chapter9.4.md","mtime":"2019-04-27T02:50:18.664Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-07T07:59:20.478Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

